printeditor: Add desktop file and appdata
authorMatthias Clasen <mclasen@redhat.com>
Sun, 28 Jun 2020 14:12:45 +0000 (10:12 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 28 Jun 2020 14:51:16 +0000 (10:51 -0400)
All our installed demos have this.

demos/print-editor/meson.build
demos/print-editor/org.gtk.PrintEditor4.appdata.xml [new file with mode: 0644]
demos/print-editor/org.gtk.PrintEditor4.desktop [new file with mode: 0644]

index baa86aed120167304e38be5742ca40e0d0c257dd..9b3e7910c557be630d5c2d812751a51912ca3b17 100644 (file)
@@ -1,7 +1,14 @@
-executable('print-editor',
+executable('gtk4-print-editor',
            ['print-editor.c'],
            c_args: common_cflags,
            dependencies: libgtk_dep,
            include_directories: confinc,
            gui_app: true,
-           link_args: extra_demo_ldflags)
+           link_args: extra_demo_ldflags,
+           install: true)
+
+# desktop file
+install_data('org.gtk.PrintEditor4.desktop', install_dir: gtk_applicationsdir)
+
+# appdata
+install_data('org.gtk.PrintEditor4.appdata.xml', install_dir: gtk_appdatadir)
diff --git a/demos/print-editor/org.gtk.PrintEditor4.appdata.xml b/demos/print-editor/org.gtk.PrintEditor4.appdata.xml
new file mode 100644 (file)
index 0000000..2d60e80
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="desktop">
+  <id>org.gtk.PrintEditor4.desktop</id>
+  <metadata_license>CC0-1.0</metadata_license>
+  <project_license>LGPL-2.0+</project_license>
+  <name>GTK Print Editor</name>
+  <summary>Program to demonstrate GTK printing</summary>
+  <description>
+    <p>
+      GTK Print Editor is a simple editor to demonstrate GTK printing.
+    </p>
+  </description>
+  <screenshots>
+    <screenshot>
+      <image>https://static.gnome.org/appdata/gtk4-print-editor/gtk-print-editor1.png</image>
+      <caption>Print Editor</caption>
+    </screenshot>
+  </screenshots>
+  <kudos>
+    <kudo>HiDpiIcon</kudo>
+    <kudo>ModernToolkit</kudo>
+  </kudos>
+  <url type="homepage">https://www.gtk.org</url>
+  <translation type="gettext">gtk-4.0</translation>
+  <update_contact>matthias.clasen_at_gmail.com</update_contact>
+  <developer_name>Matthias Clasen and others</developer_name>
+  <releases>
+    <release version="3.99.0" date="2020">
+      <description>
+        <p>A new developers snapshot towards GTK 4.0.</p>
+      </description>
+    </release>
+  </releases>
+</component>
diff --git a/demos/print-editor/org.gtk.PrintEditor4.desktop b/demos/print-editor/org.gtk.PrintEditor4.desktop
new file mode 100644 (file)
index 0000000..7c66336
--- /dev/null
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Print Editor
+Comment=A simple editor demonstrating GTK printing
+Exec=gtk4-print-editor %f
+Icon=text-editor-symbolic
+Terminal=false
+Type=Application
+StartupNotify=true
+Categories=Development;GTK;
+NoDisplay=true